log archiver has issues with epoch #226

Closed
opened 2016-06-11 08:21:39 +00:00 by philm · 10 comments
philm commented 2016-06-11 08:21:39 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

when using epoch our log archiver seems to have some issue:

==> Finished making: plymouth 1:0.8.8-2 (Sat Jun 11 08:19:40 UTC 2016)
  -> Moving [plymouth-1:0.8.8-2-x86_64.pkg.tar.xz] -> [/var/cache/manjaro-tools/pkg/unstable/x86_64]
  -> Archiving log files plymouth-1:0.8.8-2-x86_64.log.tar.xz ...
tar (child): Cannot connect to plymouth-1: resolve failed
tar: Child returned status 128
tar: Error is not recoverable: exiting now
  -> Cleaning log files ...
chown: cannot access 'plymouth-1:0.8.8-2-x86_64.log.tar.xz': No such file or directory
==> Finished building [plymouth]
 --> Time make_pkg: 1.17 minutes
*Created by: philmmanjaro* when using **epoch** our log archiver seems to have some issue: ``` ==> Finished making: plymouth 1:0.8.8-2 (Sat Jun 11 08:19:40 UTC 2016) -> Moving [plymouth-1:0.8.8-2-x86_64.pkg.tar.xz] -> [/var/cache/manjaro-tools/pkg/unstable/x86_64] -> Archiving log files plymouth-1:0.8.8-2-x86_64.log.tar.xz ... tar (child): Cannot connect to plymouth-1: resolve failed tar: Child returned status 128 tar: Error is not recoverable: exiting now -> Cleaning log files ... chown: cannot access 'plymouth-1:0.8.8-2-x86_64.log.tar.xz': No such file or directory ==> Finished building [plymouth] --> Time make_pkg: 1.17 minutes ```
philm commented 2016-06-11 08:22:15 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

tested with v0.11.901

*Created by: philmmanjaro* tested with **v0.11.901**
philm commented 2016-06-11 08:39:06 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

The new moving uses get_full_version() in util-pkg.
This function came from devtools(?)

*Created by: udeved* The new moving uses get_full_version() in util-pkg. This function came from devtools(?)
philm commented 2016-06-11 08:41:45 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

It is not about the moving rather how we archive our logs.

*Created by: philmmanjaro* It is not about the moving rather how we archive our logs.
philm commented 2016-06-11 08:43:37 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

Well, the archiving uses the full pkg name, and this is determined at moving, before tar.
It gets an array of log files to tar.
Need to check.

*Created by: udeved* Well, the archiving uses the full pkg name, and this is determined at moving, before tar. It gets an array of log files to tar. Need to check.
philm commented 2016-06-11 08:46:34 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

if [[ -z $LOGDEST ]];then
        local name=${pkgbase:-$pkgname} ver logsrc archive
        ver=$(get_full_version "$name")
        archive=$name-$ver-${target_arch}
        logsrc=$(find . -maxdepth 1 -name "$archive*.log")
        archive_logs "$archive" "${logsrc[@]}"
    fi

get_full_version should return version string, with epoch.

*Created by: udeved* ``` if [[ -z $LOGDEST ]];then local name=${pkgbase:-$pkgname} ver logsrc archive ver=$(get_full_version "$name") archive=$name-$ver-${target_arch} logsrc=$(find . -maxdepth 1 -name "$archive*.log") archive_logs "$archive" "${logsrc[@]}" fi ``` get_full_version should return version string, with epoch.
philm commented 2016-06-11 08:49:52 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

Correct, but the archiver is searching for a folder with the epoch, which is wrong. So we have to find a solution for epoch in regard of archiving. Moving is fine.

*Created by: philmmanjaro* Correct, but the archiver is searching for a folder with the epoch, which is wrong. So we have to find a solution for epoch in regard of archiving. Moving is fine.
philm commented 2016-06-11 08:50:25 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

The solution is by fixing get_full_version() my guess.

*Created by: udeved* The solution is by fixing get_full_version() my guess.
philm commented 2016-06-11 08:51:38 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

The error here is tar (child): Cannot connect to plymouth-1: resolve failed. Tar should look for folder plymouth and not for plymouth-1:.

*Created by: philmmanjaro* The error here is `tar (child): Cannot connect to plymouth-1: resolve failed`. Tar should look for folder **plymouth** and not for **plymouth-1:**.
philm commented 2016-06-11 08:55:26 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

Hmm, perhaps some missing double quotes, since the epoch bit works obviously.

*Created by: udeved* Hmm, perhaps some missing double quotes, since the epoch bit works obviously.
philm commented 2016-06-11 09:29:47 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

I have no idea why tar adds a back slash for each array element.

--> src: plymouth-1:0.8.8-1-x86_64-build.log
plymouth-1:0.8.8-1-x86_64-package.log
plymouth-1:0.8.8-1-x86_64-prepare.log
tar: plymouth-1\:0.8.8-1-x86_64-build.log\nplymouth-1\:0.8.8-1-x86_64-package.log\nplymouth-1\:0.8.8-1-x86_64-prepare.log: Cannot stat: No such file or directory

The src array is fine, the tar command somehow uses a back slash where it should not be.

*Created by: udeved* I have no idea why tar adds a back slash for each array element. ``` --> src: plymouth-1:0.8.8-1-x86_64-build.log plymouth-1:0.8.8-1-x86_64-package.log plymouth-1:0.8.8-1-x86_64-prepare.log tar: plymouth-1\:0.8.8-1-x86_64-build.log\nplymouth-1\:0.8.8-1-x86_64-package.log\nplymouth-1\:0.8.8-1-x86_64-prepare.log: Cannot stat: No such file or directory ``` The src array is fine, the tar command somehow uses a back slash where it should not be.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tools/manjaro-tools#226
No description provided.