Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same package in two repos #941

Closed
mavrothal opened this issue Jan 13, 2017 · 30 comments
Closed

Same package in two repos #941

mavrothal opened this issue Jan 13, 2017 · 30 comments
Labels

Comments

@mavrothal
Copy link
Contributor

Slackware builds have "official" as well as "patches" or "current" repos and strangely enough the (apparently) different packages have the same name and version number! This should not be happening but it does...
PPM can not handle that, particularly when we search for a package and 2-3 identically named packages are present in the results. Currently if you click in any of these, all of them are set to be installed! (test case on any slack-based puppy that has the slackware "patches" repo search in PPM for a package present in that repo)
To solve this issue when clicking on a package we should be passing in the $TREE1 variable not only the package name but also the repo. Hopefully @zigbert or somebody may look at the gtkdialog part of this.
In the mean time I got an ugly hack that tries to work around the issue but is too ugly (and wrong in its core) to commit. I'll just put it here for desperate people 😛

--- a/usr/local/petget/pkg_chooser.sh
+++ b/usr/local/petget/pkg_chooser.sh
@@ -132,6 +132,22 @@
 			echo "$(gettext "Calculating...")" > /tmp/petget/install_status
 		fi
 		NEWPACKAGE="$(grep -F $TREE1 /tmp/petget/filterpkgs.results.post)"
+		# slackware (but maybe others too) have the same package name in 2 repos!
+		# ie offical and patches or current. Must pass the repo too with TREE1
+		# but till then here is an ugly hack
+		if [ "$(echo "$NEWPACKAGE"  |wc -l )" -gt 1 ]; then
+			. /etc/DISTRO_SPECS && SLACK="$(echo $DISTRO_BINARY_COMPAT |grep slackware)"
+			if [ "$SLACK" ]; then
+				/usr/lib/gtkdialog/box_yesno "$(gettext 'Oooops')" \
+				 "$(eval echo $(gettext '$TREE1 is present in 2 repos. It is recomended to install the one from the patches repo. Do you want to go ahead with this?'))"
+				[ "$EXIT" = "yes" ] && NEWPACKAGE="$(echo "$NEWPACKAGE" | grep patches)" \
+				 || NEWPACKAGE="$(echo "$NEWPACKAGE" | grep -v patches)"
+			else
+				/usr/lib/gtkdialog/box_yesno "$(gettext 'Oooops')" \
+				 "$(eval echo $(gettext '$TREE1 is present in 2 repos. This should not be happening. Do you still want to go ahead with this?'))"
+				[ "$EXIT" != "yes" ] && NEWPACKAGE=''
+			fi
+		fi
 		echo "$NEWPACKAGE" >> /tmp/pkgs_to_install
 		add_item2 &
 	fi
@mavrothal mavrothal added the bug label Jan 13, 2017
@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jan 15, 2017

It's not advised to add the patches repo, 0setup treats that repo as the ubuntu updates.

I noticed slacko has too few packages, so i have this:
official, salix, extra, ponce.

PKG_DOCS_DISTRO_COMPAT="
z|http://salix.enialis.net/i486/slackware-${DISTRO_COMPAT_VERSION}/PACKAGES.TXT|Packages-slackware-${DISTRO_COMPAT_VERSION}-official
z|http://salix.enialis.net/i486/${DISTRO_COMPAT_VERSION}/PACKAGES.TXT|Packages-slackware-${DISTRO_COMPAT_VERSION}-salix
z|http://salix.enialis.net/i486/extra-${DISTRO_COMPAT_VERSION}/PACKAGES.TXT|Packages-slackware-${DISTRO_COMPAT_VERSION}-extra
z|http://ponce.cc/slackware/slackware-${DISTRO_COMPAT_VERSION}/lxde/PACKAGES.TXT|Packages-slackware-${DISTRO_COMPAT_VERSION}-lxde
"


REPOS_DISTRO_COMPAT="
z|http://mirror.aarnet.edu.au/pub/slackware/slackware-${DISTRO_COMPAT_VERSION}|Packages-slackware-${DISTRO_COMPAT_VERSION}-official
z|http://slackware.cs.utah.edu/pub/slackware/slackware-${DISTRO_COMPAT_VERSION}|Packages-slackware-${DISTRO_COMPAT_VERSION}-official
z|http://ponce.cc/slackware/slackware-${DISTRO_COMPAT_VERSION}/lxde|Packages-slackware-${DISTRO_COMPAT_VERSION}-lxde
z|http://slackware.mirrors.tds.net/pub/slackware/slackware-${DISTRO_COMPAT_VERSION}|Packages-slackware-${DISTRO_COMPAT_VERSION}-official
z|http://ftp.gwdg.de/pub/linux/slackware/slackware-${DISTRO_COMPAT_VERSION}|Packages-slackware-${DISTRO_COMPAT_VERSION}-official
z|http://ftp.isu.edu.tw/pub/Linux/Slackware/slackware-${DISTRO_COMPAT_VERSION}|Packages-slackware-${DISTRO_COMPAT_VERSION}-official
z|http://salix.enialis.net/i486/${DISTRO_COMPAT_VERSION}|Packages-slackware-${DISTRO_COMPAT_VERSION}-salix
z|http://ftp.nluug.nl/os/Linux/distr/salix/i486/${DISTRO_COMPAT_VERSION}|Packages-slackware-${DISTRO_COMPAT_VERSION}-salix
z|http://salix.enialis.net/i486/extra-${DISTRO_COMPAT_VERSION}|Packages-slackware-${DISTRO_COMPAT_VERSION}-extra
z|http://ftp.nluug.nl/os/Linux/distr/salix/i486/extra-${DISTRO_COMPAT_VERSION}|Packages-slackware-${DISTRO_COMPAT_VERSION}-extra
"

There are duplicates, and the best way to deal with this is just by taking the first result only.

The last changes in 1download fixes that script for this.

I know the ppm misbehaves so I guess this can go to rationalise before it gets lost.

The first thing to do is get rid of specific classic ppm stuff. Then try to rationalise the rest. This takes time, there's a lot of things to do in puppy, and it's clear that there's a just a couple of cats doing everything, in that case i would prefer to shape puppy according to my vision, and that's closer to lxpup but more lightweight

@mavrothal
Copy link
Contributor Author

There are duplicates, and the best way to deal with this is just by taking the first result only.

Yeah but they shouldn't! There is no good reason to have the same package in 2 repos or the same name in different packages. There is really no point for a package manager to try to guess which one is the "good one" or arbitrarily pick one. I think the best would be to throw a warning and maybe suggest a manual download/install.

@peabee
Copy link
Contributor

peabee commented Jan 15, 2017

It's not advised to add the patches repo, 0setup treats that repo as the ubuntu updates.

Sorry - don't understand this..... the patches repo does have updated packages.....

@mavrothal
Copy link
Contributor Author

According to this code the salckware patches repo is integrated into the "official".
AAMOF you'll find many packages in Packages-slackware-14.2-official in your latest build that point to "patches/packages" instead of "slackware/"

@peabee
Copy link
Contributor

peabee commented Jan 15, 2017

Well I never....
You learn something new every day...
Patches will be no more in the next build....

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jan 15, 2017

I think the repo order in PKG_DOCS_DISTRO_COMPAT should define the search priority. 1st result = stop and continue..

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jan 15, 2017

Hmm i read billtoo still has the same problems. by the way, if you did a new build. you should announce that now a puppy with initrd.gz can can mount and boot from exFAT partitions. it can also properly fsck vfat/msdos partitions, specially useful when booting from fat32 partitions (after improper shutdown or pfix=fsckp).. since commit 859e3bd

@mavrothal
Copy link
Contributor Author

Hmm, ih you look carefully at Biiltoo's image You can see that "patches" reappears after a db update. So it is merged into official and is also a standalone file. Thus all the duplicate files. Should be deleted after the merging.

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jan 15, 2017

I opened puppy_LxPupSc_17.01.24.sfs -> DISTRO_COMPAT_REPOS and see this:

PKG_DOCS_DISTRO_COMPAT='
z|http://ponce.cc/slackware/slackware-current/packages/PACKAGES.TXT|Packages-slackware-ponce-lxpup
z|http://www.slackware.org.uk/slackware/slackware-current/PACKAGES.TXT|Packages-slackware-current-lxpup
z|http://salix.enialis.net/i486/slackware-14.2/PACKAGES.TXT|Packages-slackware-14.2-official
z|ftp://ftp.osuosl.org/pub/slackware/slackware-14.2/patches/PACKAGES.TXT|Packages-slackware-14.2-patches
'

You have to remove the patches repo

PKG_DOCS_DISTRO_COMPAT='
z|http://ponce.cc/slackware/slackware-current/packages/PACKAGES.TXT|Packages-slackware-ponce-lxpup
z|http://www.slackware.org.uk/slackware/slackware-current/PACKAGES.TXT|Packages-slackware-current-lxpup
z|http://salix.enialis.net/i486/slackware-14.2/PACKAGES.TXT|Packages-slackware-14.2-official
'

just remove all lines containing 'patches'... and build again

sed -i '/patches/d' DISTRO_COMPAT_REPOS-lxpup

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jan 15, 2017

i can't download the pkg dbs. salix.enialis.net is throwing error 502 and it shows here
http://salixos.org/mirmon.html

Will change to nluug for the pkg dbs and will add more mirrors... after that peebee might want to just copy the file and add his custom stuff..

@mavrothal
Copy link
Contributor Author

@peabee You may also want to remove Packages-slackware-current-lxpup since it just has a lot of the same packages and after a db update will mess up ppm again. If you want to keep current-lxpup then remove entries present in official/patches

@mavrothal
Copy link
Contributor Author

@peabee I just dit a
cat Packages-slackware-14.2-official | cut -f 1 -d '|' | while read LINE ; do sed -i "/^$LINE/d" Packages-slackware-current-lxpup ; done
and only 167 packages are left in current-lxpup. The other ~1200 were duplicates of official

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jan 15, 2017

There is a conflict between current and 14.2... both are the same base. If you're building a slackware current puppy then you must remove any references to 14.2 in DISTRO_COMPAT_REPOS.

In the end i think sticking with 14.2 with pet repo updates might be the best solution, just by including pcmanfm as the default desktop app and file manager, it's an improvement over any other woofce pup. That in itself is an accomplishment, just saying...

@peabee
Copy link
Contributor

peabee commented Jan 15, 2017

Going back to first principles.....
The reason this is getting complicated is that I use different compat repositories to build than I want available to users via ppm.... so I really need 2 different DISTRO_COMPAT_REPOS - for BUILD and for USERS
I'm probably unusual in wanting something so strange - so I have to bend woof-ce to make it happen (thank goodness for 00build.conf and the Extra Commands!)

I can delete dbs from the initial build but if they're mentioned in DISTRO_COMPAT_REPOS then they will reappear during a PPM DB update.....not sure what to do about this - maybe I have to replace DISTRO_COMPAT_REPOS at the end of the build?

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jan 15, 2017

You can't replace that file at the end, but i think you can do it after running 1download.

The salix extra repo (14.2) has xfce, lxde and other goodies (mpv and other apps). But pcmanfm is missing. how ridiculous is that. You could use the standard repos and the compat repos file i'll update... and adding pcmanfm pet pkg (from ponce i486) or lxde pet with updates.. 14.2 and basically you will be happier... By following the same rules you could release both i686 and x86_64 lxpup at the same time..

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jan 15, 2017

e34c498

ok, you can use these files to produce your compat_repos file for slackware current with your exotic choices..

after 1 download is finished or (2createpackages)

  • replace the distro_compat_repos file
  • delete 14.2 pkg dbs (rm Packages14.2)
  • delete ponce (lxde) pkg db (rm Packages*-lxde)

(your distro_compat_repos file for users must not have the
the above-mentioned repos).. or something like that

@mavrothal
Copy link
Contributor Author

What about if we have a RUNTIME_IGNORE_REPOS file that the download_compat_pgk_dbs function will consult to prohibit dbs used for build to be update during runtime.
So all the builder of a "strange" puppy will need is to include this file in the z_hacks pet.

Having said that, I still think is strange to have the same packages in more that one DB and try to circumvent ways around it. Venting out duplicates with something similar as above after the db formation maybe another option though there you need to prioritise DBs and do it for all the DBs.
Beyond these I still think we should change the pkg_chooser.sh gtkdialog to pass both file name and file repo so we can avoid the installation mess and let the user deal with the database mess...

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jan 16, 2017

Well i guess for debian-based puppies there's nothing to worry about as there are complete desktops and thousands of packages, but for slackware-based puppies the situation is precarious so to get something acceptable OOTB, this is the way to go:

14.2
official + patches
salix
salix extra
ponce lxde

current:�
official + patches
ponce lxde

(14.2) There are a few duplicated pkgs, and the order should define the search priority and in fact slackware is a subset of salix and ponce is compatible with both, so taking only the 1st result makes sense (very much like support/findpkgs).

I don't understand slackware or salix, there are slackbuilds for many things, at least salix should use them to expand its extra repo.

Unless we implement advanced repo handling, this makes sense, at least for slacko.

There are major issues with the ppm that require a major rewrite as outlined by starhawk64 and technosaurus, but that is another issue..

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jan 16, 2017

There's a similar issue in dpups using the deb-multimedia repo (it wasn't working before but i fixed the urls)

deb-multimedia has extra apps such as deadbeef (i also have a script that automatically downloads and installs the latest deadbeef git builds), ripmake, aacgain, cutmp3... but also adds many duplicate pkgs.

@mavrothal
Copy link
Contributor Author

PPM is trying to stay with the same repo as possible. So when you pick a package from a repo usually works ok. The problem is when you search for a package and multiple packages with the same name/version come up.
Passing both name and repo may be the way to go here. step offered some hints and hopefully I'll find some time to try few things along this lines by next weekend.

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jan 16, 2017

Well billtoo reports errors, and i know why.

The salix repo is not enabled. I guess the extra repo takes precedence. This is not right (3builddistro-Z), but even so, the salix repo should be enabled anyway. i see this in PKGS_MANAGEMENT

PKG_REPOS_ENABLED=' Packages-puppy-slacko14.2-official Packages-puppy-noarch-official Packages-puppy-common-official Packages-extra-lxpup Packages-slackware-14.2-extra '
PKG_REPOS_ENABLED=' Packages-puppy-slacko14.2-official Packages-puppy-noarch-official Packages-slackware-14.2-official Packages-slackware-14.2-extra '

2 variables, looks like it was manually edited or something, the second one is missing 'Packages-slackware-14.2-salix'

This is what i get when i run that code (not building a slacko) with slacko configs after running 0setup

PKG_REPOS_ENABLED='Packages-puppy-slacko14.2-official Packages-puppy-noarch-official Packages-slackware-14.2-extra Packages-slackware-14.2-official Packages-slackware-14.2-salix '

Everything is correct: extra, official, salix. But the correct order should be official, salix, extra. I think i'll change the repo name to salix_extra

Well, my advice is that you use dpup stretch, it's already enabled for lxpup as, but i need to repackage eudev and pup-volume-monitor, and basically if using lxde, it makes more to use xarchiver, engrampa or file-roller (the latter ones provide a winzip, winrar experience to the user, it's a win-win situation). pupzip gives preference to any of those 3 over xarchive, plus pcmanfm recognizes any of the 3 and creates a new menu item: Compress...

@peabee
Copy link
Contributor

peabee commented Jan 16, 2017

The 2nd PKG_REPOS_ENABLED line is added in by extra-code in 00build.conf....
salix is missing because it duplicates apps in official

my advice is that you use dpup stretch, it's already enabled for lxpup

Not sure what you mean by this.....

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jan 16, 2017

I see both repos are quite different, it might duplicate some apps, don't know, but they're quite different. In fact i think salix is basically an extension of slackware, which means:

official + patches = original (1330)
salix (more packages - 709)
salix_extra (even more packages - 2598) ca50e00

after that when you add ponce, almost all lxde apps are duplicated but pcmanfm and file-roller (the most important apps)

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jan 16, 2017

hmm forget about salix_extra, i reverted that commit. it's just -extra. for slackware current you might not want to use salix.. but who knows.

@mavrothal
Copy link
Contributor Author

Here is a (woof) patch (against 4365fe9 ) that handles cases where the same package is present in multiple repos
I also attach a pet file here in case someone wants to use as the forum is not up to testing lately... (Just remove the fake zip extension)

From 20c40de93acce3b7fb0e427f6aff876dbcd28461 Mon Sep 17 00:00:00 2001
From: mavrothal <mavrothal@yahoo.com>
Date: Wed, 18 Jan 2017 23:13:17 +0200
Subject: [PATCH] Handle same package in multiple repos

---
 woof-code/rootfs-skeleton/usr/local/petget/filterpkgs.sh       |  8 ++++++++
 woof-code/rootfs-skeleton/usr/local/petget/findnames.sh        |  2 +-
 .../rootfs-skeleton/usr/local/petget/installed_size_preview.sh |  2 +-
 woof-code/rootfs-skeleton/usr/local/petget/pkg_chooser.sh      | 10 +++++++---
 4 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/woof-code/rootfs-skeleton/usr/local/petget/filterpkgs.sh b/woof-code/rootfs-skeleton/usr/local/petget/filterpkgs.sh
index 34409e8..c37a264 100755
--- a/woof-code/rootfs-skeleton/usr/local/petget/filterpkgs.sh
+++ b/woof-code/rootfs-skeleton/usr/local/petget/filterpkgs.sh
@@ -161,6 +161,14 @@ if  [ "$FPR" = "|${fltrREPO_TRIAD}" ];then
 else
  echo "$FPR" > /tmp/petget/filterpkgs.results
 fi
+
+#Add | at the end of line
+
+#awk '{print $0"|"}' /tmp/petget/filterpkgs.results
+sed -i 's/$/|/' /tmp/petget/filterpkgs.results
+printcols /tmp/petget/filterpkgs.results 1 2 4 3 1 4 | sed 's%|%|[%2' | sed 's%|%] %3' | rev | sed 's%|%,%2' | rev > /tmp/petget/filterpkgs.results.new
+cp -af /tmp/petget/filterpkgs.results.new /tmp/petget/filterpkgs.results
+rm -f /tmp/petget/filterpkgs.results.new
 #...'pkgname|category|description|repo-triad' has been written to /tmp/petget/filterpkgs.results for main gui.
 
 #120515 post-filter /tmp/petget/filterpkgs.results.post according to EXE,DEV,DOC,NLS checkboxes...
diff --git a/woof-code/rootfs-skeleton/usr/local/petget/findnames.sh b/woof-code/rootfs-skeleton/usr/local/petget/findnames.sh
index 0b0d3f5..a2a35a2 100755
--- a/woof-code/rootfs-skeleton/usr/local/petget/findnames.sh
+++ b/woof-code/rootfs-skeleton/usr/local/petget/findnames.sh
@@ -161,7 +161,7 @@ else
   #note, printcols (see support/printcols.c in Woof) needs a '|' on the end to work.
   #120811 format in /tmp/petget/filterpkgs.results.post now: pkgname|subcategory|description|dbfile, 
   # ex: htop-0.9-i486|System|View Running Processes|puppy-wary5-official (previously was: pkgname|description|dbfile)
-  POSTPROCLIST="`printcols /tmp/petget/filterpkgs.results.post 1 2 4 3 4 | sed -e 's%|%FIRSTBARCHAR%' -e 's%|%SECBARCHAR[%' -e 's%|%] %' -e 's%FIRSTBARCHAR%|%' -e 's%SECBARCHAR%|%'`"
+  POSTPROCLIST="`printcols /tmp/petget/filterpkgs.results.post 1 2 4 3 1 4| sed 's%|%|[%2' | sed 's%|%] %3' | rev | sed 's%|%,%2' | rev`"
   echo "$POSTPROCLIST" > /tmp/petget/filterpkgs.results.post
   #ex line: abiword-1.2.3|[puppy-4-official] Abiword word processor|puppy-4-official|
  fi
diff --git a/woof-code/rootfs-skeleton/usr/local/petget/installed_size_preview.sh b/woof-code/rootfs-skeleton/usr/local/petget/installed_size_preview.sh
index 682d267..90be118 100755
--- a/woof-code/rootfs-skeleton/usr/local/petget/installed_size_preview.sh
+++ b/woof-code/rootfs-skeleton/usr/local/petget/installed_size_preview.sh
@@ -3,7 +3,7 @@
 
 [ -f /root/.packages/skip_space_check ] && exit 0
 
-REPO=$(echo $1 | cut -f 4 -d '|') 
+REPO=$(echo $1 | cut -f 4 -d '|' | cut -f 2 -d ',') 
 [ ! "$REPO" ] && REPO=$(echo $1 | cut -f 2 -d '|')
 echo "$REPO" > /tmp/petget/current-repo-triad
 TREE1=$(echo $1 | cut -f 1 -d '|')
diff --git a/woof-code/rootfs-skeleton/usr/local/petget/pkg_chooser.sh b/woof-code/rootfs-skeleton/usr/local/petget/pkg_chooser.sh
index cb1b175..883bd3e 100755
--- a/woof-code/rootfs-skeleton/usr/local/petget/pkg_chooser.sh
+++ b/woof-code/rootfs-skeleton/usr/local/petget/pkg_chooser.sh
@@ -113,6 +113,8 @@ touch /tmp/install_pets_quietly
 
 
 add_item (){
+	TREEREPO=$(echo "$TREE1" | cut -f 2 -d ',')
+	TREE1=$(echo "$TREE1" | cut -f 1 -d ',')
 	# Exit if called spuriously
 	[ "$TREE1" = "" ] && exit 0
 	# Make sure that we have atleast one mode flag
@@ -134,7 +136,9 @@ add_item (){
 			echo "$(gettext "Calculating...")" > /tmp/petget/install_status
 		fi
 		NEWPACKAGE="$(grep -F $TREE1 /tmp/petget/filterpkgs.results.post)"
-		echo "$NEWPACKAGE" >> /tmp/pkgs_to_install
+		[ "$(echo "$NEWPACKAGE"  |wc -l )" -gt 1 ] && \
+		 NEWPACKAGE="$(echo "$NEWPACKAGE"  | grep $TREEREPO)"
+		echo "$NEWPACKAGE" | sed "s%$TREE1,%%" >> /tmp/pkgs_to_install
 		add_item2 &
 	fi
 }
@@ -675,8 +679,8 @@ S='<window title="'$(gettext 'Puppy Package Manager v')''${VERSION}'" width-requ
             </tree>
           </hbox>
          '${UO_5}'
-            <tree hover-selection="true" selection-mode="1" column-resizeable="true|false" space-expand="true" space-fill="true">
-              <label>'$(gettext 'Package')'|'$(gettext 'Description')'</label>
+            <tree hover-selection="true" selection-mode="1" column-resizeable="true|false" space-expand="true" space-fill="true" exported-column="2" column-visible="1|1|0">
+              <label>'$(gettext 'Package')'|'$(gettext 'Description')'|'$(gettext 'Combo')'</label>
               <variable>TREE1</variable>
               <width>'${UO_3}'</width>
               <input file icon-column="1">/tmp/petget/filterpkgs.results.post</input>
-- 
1.8.4

PPM_multi_repos-1.pet.zip

@mavrothal
Copy link
Contributor Author

One more patch that takes care of the same dependencies present in multiple repos trying to get all the dependencies from the same repo as the installed package.

--- a/usr/local/petget/dependencies.sh
+++ b/usr/local/petget/dependencies.sh
@@ -234,9 +234,22 @@
  fi
 done
 
+# Get dependencies preferably from the same repo (Is a mess in slackware pups)
+MAINDB="$(basename $DB_MAIN)"
+for ONEREPODB in $DB_OTHERS
+do
+ DBFILE="`basename $ONEREPODB`" 
+ cat /tmp/petget_missing_dbentries-${MAINDB} | cut -f 1 -d '|' | while read ENTRY
+ do
+  sed -i "/^$ENTRY|/d" /tmp/petget_missing_dbentries-${DBFILE} 2>/dev/null
+ done
+done
+
+if [ "$WHATS_UP_DOC" ]; then # <<<  Inactivate this next block of code >>>
 # Give priority to Slackware patches over official
 if [ "$DISTRO_BINARY_COMPAT" = "slackware64" -o "$DISTRO_BINARY_COMPAT" = "slackware" ]; then
  PATCHES=/tmp/petget_missing_dbentries-Packages-*lackware*-patches
+ CURRENT=/tmp/petget_missing_dbentries-Packages-*lackware*-current*
  OFFICIAL=/tmp/petget_missing_dbentries-Packages-*lackware*-official
  SALIX=/tmp/petget_missing_dbentries-Packages-*lackware*-salix
  SLACKY=/tmp/petget_missing_dbentries-Packages-*lackware*-slacky
@@ -245,6 +258,7 @@
   do
    COMMON=$(echo $LINE |cut -f 2 -d '|')
    sed -i "/|$COMMON|/d" ${OFFICIAL} 2>/dev/null
+   sed -i "/|$COMMON|/d" ${CURRENT} 2>/dev/null
    sed -i "/|$COMMON|/d" ${SALIX} 2>/dev/null
    sed -i "/|$COMMON|/d" ${SLACKY} 2>/dev/null
   done
@@ -260,6 +274,7 @@
   done
  fi
 fi
+fi # END of <<< Inactivate this next block of code
 
 [ ! -f /tmp/install_quietly ] && kill $X1PID || exit 0
 

One remaining issue here is when another repo has a different version of the said package. We could add some version comparison and download if newer (trusting that the builder will not include incompatible repos) or just go with the package name and ignore packages in other repos regardless of version.
Any thoughts?

@mavrothal
Copy link
Contributor Author

Eliminating other repos completely might not be good if dependencies needed are only in other repos

The dependency must be in the repo which the package is installed from, to be eliminated in the others. So if is not there nothing gets eliminated from anywhere.
There is one case though that the latest patch will not cover: the dependency missing in the original repo and be present in 2 (or more) other repos! Hopefully, will not come across SUCH an ugly repo.

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jan 28, 2017

0setup could also remove duplicates at the end. There's also the slacky repos. They have a few pkgs for 14.2, more pkgs for 14.1, many packages for 14.0 and so on, even more pkgs for 13.37 and so on..

@mavrothal
Copy link
Contributor Author

Sure you can have 0setup or another script to eliminate duplicates but even there you must be sure that deps are the same in the 2 (3, 4,5) repos and that the packages are build the same way in the different repos before you decide which way to go.
I think that all these try to solve a problem that should not exist! (why someone would mix 14.2 and 13.37 repos?)
I think puppy building should be a bit more sane than that.
I'm not really considering committing any of the above.

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jan 28, 2017

I certainly wouldn't, but repos belonging to a specific distro version should all be compatible, that's the idea. But some "extra" repos do have duplicates, i.e: debian multimedia..

mavrothal referenced this issue Feb 6, 2017
patches is already integrated into official

faster processing

might be of interest to @peabee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants