LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   slackpkg vs. third-party package repository (https://www.linuxquestions.org/questions/slackware-14/slackpkg-vs-third-party-package-repository-4175427364/)

zerouno 06-14-2016 01:28 PM

Yes,
I was wrong to underestimate this criticism.

Code:

diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh
index 62fe7e6..5d4b129 100755
--- a/src/slackpkgplus.sh
+++ b/src/slackpkgplus.sh
@@ -620,7 +620,11 @@ if [ "$SLACKPKGPLUS" = "on" ];then
            URLFILE=${URLFILE:6}
            cp -v $URLFILE ${TMPDIR}/$CLOGNAM
          else
-            $DOWNLOADER ${TMPDIR}/$CLOGNAM $URLFILE
+            if [ $VERBOSE -gt 2 ];then
+              $DOWNLOADER ${TMPDIR}/$CLOGNAM $URLFILE
+            else
+              $DOWNLOADER ${TMPDIR}/$CLOGNAM $URLFILE 2>/dev/null
+            fi
          fi
 
          ((LEVEL++))

However
CACHEUPDATE=on
in config file trap the error.

zerouno 06-14-2016 05:53 PM

Started development branch (bugfix)

Quote:

Tue Jun 15 00:45:00 CEST 2016
pkg/slackpkg+-1.7.0d0-noarch-1mt.txz: Upgraded
Setting up mainline branch.
- Fixed some typos and missed SEARCH_CLOG_INPARENT documentation in README
- Suppress wget output in ChangeLog downloading
- Fixed an issue when an invalid repository is configured
+-------------------------+

kjhambrick 06-14-2016 05:57 PM

Curious ...

Have Y'All considered using rsync instead of wget if possible ?

rsync will conserver bandwidth if the files are already on the User's System ...

-- kjh

zerouno 06-14-2016 06:05 PM

rsync is useful to download an entire tree, not just a file (even if it is possible).
You can try to customize the
DOWNLOADCMD=
entry in configuration file to use rsync if you want

But This is not useful to conserve bandwidth.
slackpkg does not download a package if it is already downloaded, and it you set CACHEUPDATE=on it does not redownload metadatas too if they are not changed.

bamunds 06-20-2016 12:11 PM

Problem with 17.0-2mt...the repositories for 14.1 are replaced with 14.2 in the conf file. Then when I corrected back to 14.1 the file connections are being refused.

zerouno 06-20-2016 12:16 PM

I do not understand.
Please post the output of slackpkg update.

bamunds 06-20-2016 02:29 PM

Slackware 14.1 x86_64 and slackpkgplus-17.0-noarch-1mt installed. I ran sudo /usr/sbin/slackpkg update then install-new and upgrade-all.
The list of upgrades presented slackpkgplus-17.0-noarch-2mt. I accepted the udgrade and MERGED my existing slackpkgplus.conf with the slackpkgplus.conf.new and accepted the selections to replace the MIRRORPLUS addresses for 'multilib', 'alienbob', 'restricted', and 'ktown'. After running slackpkg update gpg, and attempting to run slackpgk update, I recieved the message that some respositories were not configured. So I cat /etc/slackpkg/slackpkgplus.conf and find that the 14.1 version mirrors are no longer in the slackpkgplus mirror lists. I realize that you comment out the MIRRORPLUS respositories, because not everyone is using them. However, I wasn't expected the new commented ones to be for 14.2 already. So I edit slackpkgplus.conf and created MIRRORPLUS address for the 14.1 missing repositories, based on the 14.2 addresses, simply replacing 14.2 with 14.1. Then rerun slackpkg update gpg, and slackpkg update. When running slackpkg update I'm told the connections are refused.

Alien's' repository connection refusals as of 20:30 GMT are now accepted, must have been a temporary connection issue, although I waited 10 minutes at 16:45 GMT between update attempts before posting earlier.

I also note that alienbob's ChangeLog.Txt files are not found in the repository address but one or two levels higher in the tree. Thank you for including code that will search a higher level than the address provided for the changelog.

Hope this better explains what I experienced. Cheers, BrianA_MN

zerouno 06-20-2016 02:50 PM

I do not understand if the problem was for all repositories or just for alienbob (it was temporary down?), and if it still remain for some repository.

I added 14.2 repositories (commented) since official slackpkg in slackware-current have added it (even if it does not exists).


Yes, changelog in many repositories is some levels higher in the tree; thanks to phenixia2003 for the code ;). In slackpkg+-1.7.0-noarch-1mt this did cause some 404 error, solved in -2mt release (also consider to use CACHEUPDATE=on for a better output and performance in slackpkg update).
Unfortunately in most of repositories having the changelog out of main tree, that changelog does not contains a slackware-compatible changelog format; for that repositories it will be ignored.

Thank you for feedback.

bamunds 06-20-2016 03:34 PM

It was for only repositories from alienbob (ktown, alienbob, multilib, restricted).
I understand why you added the 14.2 repositories, but, shouldn't the still functional "official" repositories be the preference. If 14.2 was the official "long term" or "stable" (not sure which tem Pat prefers), then it would make sense to use it rather than 14.1. It is like the slacke18, the current stable version of the "E" environment, you dropped slacke17 and changed to slacke18 when it was officially announced as stable. I know you still include the other older releasese in the MIRRORPLUS repository list below. That is a nice reference and appreciated.

Keep up the great work. Cheers, BrianA_MN.

zerouno 06-20-2016 04:33 PM

In slackpkg+ prior 1.7, I put a default configuration with UNCOMMENTED 14.1 repositories.
Well, I think that this is not the best practice, even if it works.
So in slackpkg+ 1.7 I prefered to add a commented configuration, and since Patrick had declared that the stable is very near to release
Quote:

Thu Jun 2 19:08:13 UTC 2016
This could be the last batch of updates before 14.2 stable, so please test!
I have added a configuration ready for the new stable release to avoid to remake a new package in few days.

Unfortunately seems that Patrick has a strange conception of the word "last" :D, but have no sense now to repackage it with 14.1 repositories.

However all really working repositories are listed in /usr/doc/slackpkg+-*/repositories.lst

Regard slackE, I do not know really it.

For all repositories, simply I look for "PACKAGES.TXT" on google.

Then tipically if the author contact me, I fix it with his instruction, otherwise I sometime check for updates. Also note that the repositories.txt is not an official or exaustive or authoritative document, and repositories in that list cannot be considered as trusted/full working/supported (the only supported repository is the slackware official), and I'm not constrained to reflect/follow the repositories changes as is the repositories authors are not constrained to reflect/comunicate his repository changes; and anyone can add a repository to slackpkgplus.conf also if it is not in repositories.txt (someone asked me to remove his own repository from that list, and I removed it, but it still remain in my personal slackpkgplus.conf ;) )
I just TRY to keep it updated, and sometime the repository's author help me.

Casually I saw slacke18 about one year ago, while slacke18 was released about two years ago.
But my last contact with the author was about 3 years ago.

Recently I had thought to remove slacke totally from repository.txt since both repository and site are stalled to two years ago. But I've desisted

bamunds 06-20-2016 04:41 PM

Thanks for the clarification. Best Regards, BrianA_MN

bassmadrigal 06-20-2016 06:15 PM

Quote:

Originally Posted by zerouno (Post 5563799)
So in slackpkg+ 1.7 I prefered to add a commented configuration, and since Patrick had declared that the stable is very near to release

I have added a configuration ready for the new stable release to avoid to remake a new package in few days.

Unfortunately seems that Patrick has a strange conception of the word "last" :D, but have no sense now to repackage it with 14.1 repositories.

However all really working repositories are listed in /usr/doc/slackpkg+-*/repositories.lst

Maybe in this case it would be good to mimic slackpkg's mirror list and just keep all of them commented out and require the user to go in and enable what they want to use. Then you don't accidentally install the wrong versions of packages because a user forgot to change the mirror to a different version.

I think it would be best to err on the side of caution and require the user to configure their config file and uncomment the mirrors they wish to use.

bamunds 06-20-2016 09:35 PM

@bassmadrigal Actually, that is what zerouno is doing. He setup the slackpkgplus.conf with the 14.2 MIRROR addresses but they are commented out. I apologize if my earlier explanation was not clear on that point.

Since I don't know if you are familiar with slackpkgplus, and other newbies may read this later, let me further explain. When using slackpkgplus if a new slackpkgplus.conf is available one of the options is to merge your existing .conf with the .conf.new file profided with upgrades. In the merger process you are shown both the existing config and the proposed config, side by side, and you choose which you want in the new merged file. In the .conf.new zerouno comments out all mirrors and you have to keep your old lines or after accepting the new, then "edit"(another option after the merge) the conf file and uncomment the new mirror lines. My feedback was more about the lack of the 14.1 mirrors as default provided config and zerouno's choice to include 14.2 mirror lines. I follow his reasoning, but I feel that until Slackware release is stable, as announced by Pat, that configs for "stable" releases should be primary and "current" should be optional in the mirror list. Just a differnce of opinion. Hey, zerouno is the developer and can and should do what he feels is best for his application/packaging. I'm just one user of many thousands of slackpkgplus, and I'm sure we all have our own prefernces. As far as I know more "current" users are using the application than "stable'. Mine was only feedback not criticism. Cheers, BrianA_MN

yars 06-21-2016 07:09 PM

Hi zerouno, possible the problem I found: when I tried to search by the word 'slackpkg', I get
Code:

# slackpkg search slackpkg

Looking for slackpkg in package list. Please wait... DONE

The list below shows all packages with name matching "slackpkg".

[ Status          ] [ Repository              ] [ Package                                  ]
  installed              slackware64                  slackpkg-2.82.1-noarch-3                 
  uninstalled(masked)      slackpkgplus                slackpkg+-1.7.0-noarch-2mt               

You can search specific files using "slackpkg file-search file".

I know the reason: it appears because we do below:
Code:

        if grep -E ${GREPOPTS} -q ":bname:${PKGBASENAME}:" $PKGLIST ; then

          # if the current package P is installed, this means the previous P' will be
          # proposed as an upgrade to P. In this case, the loop must continue without
          # any other action...
          grep -E ${GREPOPTS} -q " $PKGFULLNAME " ${TMPDIR}/tmplist && continue

            # The current package P is not installed. In this case P must be shown as
            # being uninstalled and masked.
          LIST="$LIST MASKED_${PKGDIR}:${PKGFULLNAME}"
        else
          LIST="$LIST ${PKGDIR}:${PKGFULLNAME}"
        fi

The pattern 'slackpkg' matches the slackpkg and then slackpkg+, both is installed, and as described in the code above, slackpkg+ will be marked as uninstalled and masked... Here is a debug output (via sh -x slackpkg search slackpkg). I will look at this later.

phenixia2003 06-22-2016 02:35 AM

Hello,

Quote:

Originally Posted by yars (Post 5564451)

[ Status ] [ Repository ] [ Package ]
installed slackware64 slackpkg-2.82.1-noarch-3
uninstalled(masked) slackpkgplus slackpkg+-1.7.0-noarch-2mt

You can search specific files using "slackpkg file-search file".
[/code]
I know the reason: it appears because we do below:
Code:

        if grep -E ${GREPOPTS} -q ":bname:${PKGBASENAME}:" $PKGLIST ; then

          # if the current package P is installed, this means the previous P' will be
          # proposed as an upgrade to P. In this case, the loop must continue without
          # any other action...
          grep -E ${GREPOPTS} -q " $PKGFULLNAME " ${TMPDIR}/tmplist && continue
        else
          LIST="$LIST ${PKGDIR}:${PKGFULLNAME}"
        fi

The pattern 'slackpkg' matches the slackpkg and then slackpkg+, both is installed, and as described in the code above, slackpkg+ will be marked as uninstalled and masked... Here is a debug output (via sh -x slackpkg search slackpkg). I will look at this later.


This is the conjunction of the use of grep -E and the presence of a "+" in slackpkg+. Therefore, the "+" is interpreted by grep as a repetition operator, so, slackpkg+-1.7.0-noarch-2mt cannot be found in ${TMPDIR}/tmplist. Example:

Code:

$ echo " slackpkg+ slackpkg+-1.7.0-noarch-2mt " > /tmp/tmplist
Using grep -E :
Code:

$ grep  -E " slackpkg+-1.7.0-noarch-2mt " /tmp/tmplist --color
Using grep :
Code:

$ grep  " slackpkg+-1.7.0-noarch-2mt " /tmp/tmplist  --color
 slackpkg+ slackpkg+-1.7.0-noarch-2mt

Since the pattern is always a package name, I don't see any reason to use an extended grep :

Code:

--- slackpkgplus.sh.orig        2016-06-22 09:35:57.724124388 +0200                                   
+++ slackpkgplus.sh    2016-06-22 09:35:57.724124388 +0200
@@ -1066,7 +1066,7 @@
            # if the current package P is installed, this means the previous P' will be
            # proposed as an upgrade to P. In this case, the loop must continue without
            # any other action...
-          grep -E ${GREPOPTS} -q " $PKGFULLNAME " ${TMPDIR}/tmplist && continue
+          grep ${GREPOPTS} -q " $PKGFULLNAME " ${TMPDIR}/tmplist && continue
 
            # The current package P is not installed. In this case P must be shown as
            # being uninstalled and masked.

--
SeB


All times are GMT -5. The time now is 06:16 PM.