diff --git a/conf/slackware-changelogs-mirror b/conf/slackware-changelogs-mirror deleted file mode 100644 index 1840e82b..00000000 --- a/conf/slackware-changelogs-mirror +++ /dev/null @@ -1,26 +0,0 @@ -# Slackware ChangeLog mirror. -# -# http://www.slackware.com/changelog/ -# -# The latest happenings in Slackware development can be seen by looking -# at the ChangeLogs in the various distribution trees. For your bleeding -# edge enjoyment, we are providing the ChangeLogs for the -current -# development tree as well as the latest stable release on the web site. -# The latest ChangeLogs can always be found on ftp://ftp.slackware.com We -# are updating this page every two hours, so they will remain fairly -# current. But the truly bleeding edge will want to leave an ftp session -# open to ftp://ftp.slackware.com and less the ChangeLog every 5 minutes. -# -# Uncomment ONLY ONE mirror each time -# -# ---------------------------------------------------------------------------- -# For Slackware -stable and -current: -# ---------------------------------------------------------------------------- -http://ftp.osuosl.org/pub/slackware/ -# ftp://ftp.osuosl.org/pub/slackware/ -# -# ---------------------------------------------------------------------------- -# For Slackware ARM -stable and -current: -# ---------------------------------------------------------------------------- -# http://ftp.arm.slackware.com/slackwarearm/ -# ftp://ftp.arm.slackware.com/slackwarearm/ diff --git a/slackbuild/doinst.sh b/slackbuild/doinst.sh index 52802654..e4d91c67 100644 --- a/slackbuild/doinst.sh +++ b/slackbuild/doinst.sh @@ -8,8 +8,7 @@ config() { fi } -CONFIGS="slpkg.conf repositories.conf blacklist slackware-mirrors custom-repositories \ - slackware-changelogs-mirror" +CONFIGS="slpkg.conf repositories.conf blacklist slackware-mirrors custom-repositories" for file in $CONFIGS; do config etc/slpkg/${file}.new done diff --git a/slackbuild/slpkg.SlackBuild b/slackbuild/slpkg.SlackBuild index 4fee2739..a5ae4c13 100755 --- a/slackbuild/slpkg.SlackBuild +++ b/slackbuild/slpkg.SlackBuild @@ -86,8 +86,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr mkdir -p $PKG/etc/slpkg # install configurations files -CONFIGS="slpkg.conf repositories.conf blacklist slackware-mirrors custom-repositories \ - slackware-changelogs-mirror" +CONFIGS="slpkg.conf repositories.conf blacklist slackware-mirrors custom-repositories" for file in $CONFIGS; do install -D -m0644 conf/$file $PKG/etc/slpkg/${file}.new done diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index a820b7fe..af97c218 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -232,9 +232,6 @@ class MetaData(object): # slackpkg lib path slackpkg_lib_path = "/var/lib/slackpkg/" - # slackpkg conf path - slackpkg_conf = "/etc/slackpkg/" - # computer architecture arch = os.uname()[4] diff --git a/slpkg/slack/patches.py b/slpkg/slack/patches.py index 27756e5d..01b4d77a 100644 --- a/slpkg/slack/patches.py +++ b/slpkg/slack/patches.py @@ -225,42 +225,16 @@ class Patches(object): break def slackpkg_update(self): - """ - This replace slackpkg ChangeLog.txt file with new + """This replace slackpkg ChangeLog.txt file with new from Slackware official mirrors after update distribution. """ - log_mirror, arch = "", "" - ChangeLog_txt = "ChangeLog.txt" - ChangeLog_old = ChangeLog_txt + ".old" - arch = ("64" if self.meta.arch == "x86_64" else - "arm" if self.meta.arch.startswith("arm") else "") - slackware_mirror = self.utils.read_config(self.utils.read_file( - self.meta.conf_path + "slackware-changelogs-mirror")) - slackpkg_mirror = self.utils.read_config( - self.utils.read_file("{0}{1}".format(self.meta.slackpkg_conf, - "mirrors"))) - if slackpkg_mirror: - if arch.startswith("arm") and "current" == self.meta.slack_rel: - log_mirror = "{0}slackware{1}-{2}/{3}".format( - slackware_mirror, arch, self.meta.slack_rel, ChangeLog_txt) - elif arch.startswith("arm"): - log_mirror = "{0}slackware{1}-{2}/{3}".format( - slackware_mirror, arch, slack_ver()[1], ChangeLog_txt) - elif "current" == self.meta.slack_rel: - log_mirror = "{0}slackware{1}-{2}/{3}".format( - slackware_mirror, arch, self.meta.slack_rel, ChangeLog_txt) - elif slackpkg_mirror: - log_mirror = "{0}slackware{1}-{2}/{3}".format( - slackware_mirror, arch, slack_ver(), ChangeLog_txt) - slackware_log = URL(log_mirror).reading() - if os.path.isfile(self.meta.slackpkg_lib_path + ChangeLog_txt): - if os.path.isfile(self.meta.slackpkg_lib_path + ChangeLog_old): - os.remove(self.meta.slackpkg_lib_path + ChangeLog_old) - shutil.copy2(self.meta.slackpkg_lib_path + ChangeLog_txt, - self.meta.slackpkg_lib_path + ChangeLog_old) - if os.path.isfile(self.meta.slackpkg_lib_path + ChangeLog_txt): - os.remove(self.meta.slackpkg_lib_path + ChangeLog_txt) - with open(self.meta.slackpkg_lib_path + ChangeLog_txt, - "w") as log: - log.write(slackware_log) + NEW_ChangeLog_txt = URL(mirrors("ChangeLog.txt", "")).reading() + if os.path.isfile(self.meta.slackpkg_lib_path + "ChangeLog.txt.old"): + os.remove(self.meta.slackpkg_lib_path + "ChangeLog.txt.old") + if os.path.isfile(self.meta.slackpkg_lib_path + "ChangeLog.txt"): + shutil.copy2(self.meta.slackpkg_lib_path + "ChangeLog.txt", + self.meta.slackpkg_lib_path + "ChangeLog.txt.old") + os.remove(self.meta.slackpkg_lib_path + "ChangeLog.txt") + with open(self.meta.slackpkg_lib_path + "ChangeLog.txt", "w") as log: + log.write(NEW_ChangeLog_txt) log.close()