Code Monkey home page Code Monkey logo

Comments (6)

pbrisbin avatar pbrisbin commented on August 16, 2024 1

The patch adds the following line,

if [[ $(pacman -Si $name | grep '@manjaro') ]]

Which I suspect is where the extra output comes from:

% pacman -Si 'foo|bar'
error: package 'foo|bar' was not found

That shell is not correct. It should probably be more like,

if pacman -Si "$name" &>dev/null | grep -Fq '@manjaro'; then

So this seems to be a bug in the patch and unrelated to downgrade.

from downgrade.

pbrisbin avatar pbrisbin commented on August 16, 2024 1

@atreyasha the line you quoted is probably not the source because you can see it (correctly) includes 2>/dev/null and is (also correctly) checking the output instead of passing it uselessly to [[ ;)

from downgrade.

atreyasha avatar atreyasha commented on August 16, 2024

Hi Stefano, thanks for the question.

I do not fully understand the issue. Is cram raising an error when testing or does it concern PKGBUILD when building the package?

Please provide error logs and commands that you used, so I can reproduce the error.

from downgrade.

Ste74 avatar Ste74 commented on August 16, 2024

Hi, thank you for answear.
Step for reproduce:
git clone git clone https://gitlab.manjaro.org/packages/community/manjaro-downgrade.git
cd manjaro-downgrade
git checkout github
makepkg -sr

errors:

    ~/manjaro-downgrade    github ?1    export LANG=C && makepkg -srCcf
==> Making package: manjaro-downgrade 2.0-2 (lun 8 mag 2023, 18:27:24)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Packages (1) python-cram-0.7-10

Total Installed Size:  0,17 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) installing python-cram                       [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
==> Retrieving sources...
  -> Found downgrade-11.3.0.tar.gz
  -> Found atreya.pgp
  -> Found manjaro-downgrade.patch
==> Validating source files with sha256sums...
    downgrade-11.3.0.tar.gz ... Passed
    atreya.pgp ... Passed
    manjaro-downgrade.patch ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting downgrade-11.3.0.tar.gz with bsdtar
==> Starting prepare()...
patching file bin/downgrade
==> Removing existing $pkgdir/ directory...
==> Starting check()...
cram test
...!
--- test/main/invalid-input.t
+++ test/main/invalid-input.t.err
@@ -8,6 +8,7 @@
   > printf "ignore: %s\n" "${to_ignore[@]}"
   > printf "install: %s\n" "${to_install[@]}"
   > printf "exit code: %s\n" "$exit_code"
+  error: package 'foo|bar' was not found
   Failed to parse A.L.A.
   No results found
   Unable to downgrade foo|bar
.....................................
# Ran 41 tests, 0 skipped, 1 failed.
make: *** [Makefile:34: test] Error 1
==> ERROR: A failure occurred in check().
    Aborting...
==> Removing installed dependencies...
checking dependencies...

Packages (1) python-cram-0.7-10

Total Removed Size:  0,17 MiB

:: Do you want to remove these packages? [Y/n] 
:: Processing package changes...
(1/1) removing python-cram                         [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
    ~/manjaro-downgrade    github ?1    

Sorry for the foreign characters, i use custom zsh shell.

Stefano

from downgrade.

atreyasha avatar atreyasha commented on August 16, 2024
cram test
...!
--- test/main/invalid-input.t
+++ test/main/invalid-input.t.err
@@ -8,6 +8,7 @@
   > printf "ignore: %s\n" "${to_ignore[@]}"
   > printf "install: %s\n" "${to_install[@]}"
   > printf "exit code: %s\n" "$exit_code"
+  error: package 'foo|bar' was not found
   Failed to parse A.L.A.
   No results found
   Unable to downgrade foo|bar
.....................................
# Ran 41 tests, 0 skipped, 1 failed.
make: *** [Makefile:34: test] Error 1

The diff above originates from the following line throwing an error:

LC_ALL=C.UTF8 "$PACMAN" -Qi "$1" 2>/dev/null | awk -F " : " '

error: package 'foo|bar' was not found should not be logged since we redirect stderr to /dev/null. So the problem could be with the redirection or the line being streamed to stdout instead.

Do you encounter this error when you build without the .patch files?

from downgrade.

Ste74 avatar Ste74 commented on August 16, 2024

Thank you to point me .. pacman -Si Is the guilty so Need to modify this check ..

Thank you again

Cheers
Stefano

from downgrade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.