diff options
author | 2017-12-29 16:48:10 +0100 | |
---|---|---|
committer | 2017-12-29 16:48:10 +0100 | |
commit | 3e85ed04229e34ec5fd77226a146517c90d46fc2 (patch) | |
tree | a8e42751fb17e4dd6c4f0c4e39b771d02d81a2e8 | |
parent | added app-portage/darkelf-features. (diff) | |
download | darkelf-3e85ed04229e34ec5fd77226a146517c90d46fc2.tar.gz darkelf-3e85ed04229e34ec5fd77226a146517c90d46fc2.tar.bz2 darkelf-3e85ed04229e34ec5fd77226a146517c90d46fc2.zip |
fixed app-portage/darkelf-features better collision checks and cleanup.
-rw-r--r-- | app-portage/darkelf-features/Manifest | 2 | ||||
-rw-r--r-- | app-portage/darkelf-features/darkelf-features-0.1.ebuild | 18 |
2 files changed, 17 insertions, 3 deletions
diff --git a/app-portage/darkelf-features/Manifest b/app-portage/darkelf-features/Manifest index f72840e..59ca3f3 100644 --- a/app-portage/darkelf-features/Manifest +++ b/app-portage/darkelf-features/Manifest @@ -1,3 +1,3 @@ DIST darkelf-features-bashrc 641 SHA256 1b5c9b6560b38082b452f85ad3d9a36b7ad8eeadb1d466f78fdd52fe47098943 SHA512 d7c101e725a853ef3aeea5b27ab880bfaeacff0d6be955a3b164d2a1c98697cc5e7445c9905b8bc944e12a6a5877fbc9efa315ca37b0ef88f520dc8b1deca7af WHIRLPOOL d43688e73c43ead751b7fe4beaecc3b11217de249f12e6edfbe35cf763224d4d85e77ab8abc15f5c378faeff09b3df5b2e264a08e1303feccb2b2937cfcc9d43 -EBUILD darkelf-features-0.1.ebuild 735 SHA256 d90e3d360048adfd4c61bd0a7953c239495e9b376127f3bb785a647ed9e0d826 SHA512 ae59079dfb697843b2c8e78d267043d5e72cfdb7402f9a764a952a8cbc3be45737fa5969394f245929af9d2398445e0c675ac672805644d8c3db14d22a32cb42 WHIRLPOOL 38ee84c11a399822fdbc090c45490886099bd3e36f815334b7ed2e69f2f66e964bb4933f06d7ec49e1750502fcb54e949a192ef6c440a146f5f287703c06fee5 +EBUILD darkelf-features-0.1.ebuild 1466 SHA256 09b59d6904428ac0672033cfcf4a697eb2f8f1bf717ee51ffa538f47643a55c9 SHA512 4638d0e7cffefac9f580a59f91f45c8cb91cda32d2b76ba066e65a44d71866959b4abbc6508d52a03daf10133026774071680bb2e14b12eafe089fcde1c4a34a WHIRLPOOL 2dbeceec37d228c5ba212515cdd82bc0fe7caef5f4551b5484254c9a2c68e1c39f083e817ff5399885d8c302eb6e12a1f8565253a3dadc6966d211167a8afc44 MISC metadata.xml 376 SHA256 72e0856f24239232f7beac8f61bc78804796d7c1506807d4f240f7784ae6a5c7 SHA512 54ff500681271559db61dea8ac213bc032fce32c8aa61289a7763c579293c4f12f14768d42cde5f77d1e89ba2628babe84fd23e33f7bfca45691a5df1ceb8a54 WHIRLPOOL d29b0033b9acf32b0be2cb2f0d71fbd706cade04c1e4063e9665804d7763eee759ff512981b65dfbe19c595b12989b1731b241bd90f855d18737e703e7d6aaba diff --git a/app-portage/darkelf-features/darkelf-features-0.1.ebuild b/app-portage/darkelf-features/darkelf-features-0.1.ebuild index 744959f..b71b469 100644 --- a/app-portage/darkelf-features/darkelf-features-0.1.ebuild +++ b/app-portage/darkelf-features/darkelf-features-0.1.ebuild @@ -15,9 +15,23 @@ SLOT="0" S="${WORKDIR}/" pkg_postinst() { - cp "$DISTDIR"/darkelf-features-bashrc /etc/portage/bashrc || die - if ! grep -q "^#?DARKELF_FEATURES" /etc/portage/make.conf ; then + if [ ! -f /etc/portage/bashrc ]; then + cp "$DISTDIR"/darkelf-features-bashrc /etc/portage/bashrc || die + elif ! b2sum --quiet -c <<< "2e423452045799e5f0a4fac20c183a21a97fe66797d12646a79e154681fead73ba52300e1e939c1e4d3448a4d2ea6a33c213ae44461b8dadd904537fe7132505 /etc/portage/bashrc" ; then + eerror ERROR: A different /etc/portage/bashrc does already exist. + fi + if ! grep -q "DARKELF_FEATURES" /etc/portage/make.conf ; then echo '#DARKELF_FEATURES="postmerge_distclean"' >> /etc/portage/make.conf || die fi elog "To enable cleaning distfiles after every merged ebuild uncomment DARKELF_FEATURES=\"postmerge_distclean\" in /etc/portage/make.conf." } + +pkg_postrm() { + cp /etc/portage/make.conf make.conf + sed "/^#DARKELF_FEATURES=\"postmerge_distclean\"/d" make.conf > /etc/portage/make.conf + if b2sum --quiet -c <<< "2e423452045799e5f0a4fac20c183a21a97fe66797d12646a79e154681fead73ba52300e1e939c1e4d3448a4d2ea6a33c213ae44461b8dadd904537fe7132505 /etc/portage/bashrc" ; then + rm /etc/portage/bashrc + else + ewarn /etc/portage/bashrc will be kept because it was modified. + fi +} |