Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 432214 - unpacker.eclass: add support cpio archives
Summary: unpacker.eclass: add support cpio archives
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: Inclusion, InVCS, PATCH
Depends on:
Blocks: 432262
  Show dependency tree
 
Reported: 2012-08-21 15:47 UTC by Christoph Junghans (RETIRED)
Modified: 2012-09-13 17:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to support cpio archives (unpacker.eclass.patch,1.09 KB, patch)
2012-08-21 15:47 UTC, Christoph Junghans (RETIRED)
Details | Diff
patch to support cpio archives (unpacker.eclass.patch,1.08 KB, patch)
2012-08-21 16:18 UTC, Christoph Junghans (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Junghans (RETIRED) gentoo-dev 2012-08-21 15:47:47 UTC
Created attachment 321878 [details, diff]
patch to support cpio archives

This is needed for example for app-shells/mksh.
Comment 1 SpanKY gentoo-dev 2012-08-21 16:01:01 UTC
Comment on attachment 321878 [details, diff]
patch to support cpio archives

>+	#needed as cpio always reads from stdin

# Comments are like this

>+	if [[ $1 = "-" ]]; then

use "==", not "=", and put a space before that ";"

>+		unpack_banner "stdin"
>+		cpio --make-directories --extract --preserve-modification-time

add a new local array like:
  local cmd=( cpio --make-directories --extract --preserve-modification-time )

then use it in both these places like:
  "${cmd[@]}"

>+		cpio --make-directories --extract --preserve-modification-time <"$cpio"

"${cpio}"

>+	*.cpio.*|*.cpio)

do you really need the *.cpio.* ?  i guess you want to handle like .cpio.gz ?
Comment 2 Christoph Junghans (RETIRED) gentoo-dev 2012-08-21 16:18:34 UTC
Created attachment 321880 [details, diff]
patch to support cpio archives

(In reply to comment #1)
> Comment on attachment 321878 [details, diff] [details, diff]
> patch to support cpio archives
> 
> >+	#needed as cpio always reads from stdin
> 
> # Comments are like this
> 
> >+	if [[ $1 = "-" ]]; then
> 
> use "==", not "=", and put a space before that ";"
> 
> >+		unpack_banner "stdin"
> >+		cpio --make-directories --extract --preserve-modification-time
> 
> add a new local array like:
>   local cmd=( cpio --make-directories --extract --preserve-modification-time
> )
> 
> then use it in both these places like:
>   "${cmd[@]}"
> 
> >+		cpio --make-directories --extract --preserve-modification-time <"$cpio"
> 
> "${cpio}"
You are kind of a syntax nazi :-) All done!

> >+	*.cpio.*|*.cpio)
> 
> do you really need the *.cpio.* ?  i guess you want to handle like .cpio.gz ?
Yes, app-shells/mksh uses cpio.gz.
Comment 3 SpanKY gentoo-dev 2012-08-21 16:50:24 UTC
(In reply to comment #2)

LGTM; feel free to commit
Comment 4 Christoph Junghans (RETIRED) gentoo-dev 2012-08-22 03:48:30 UTC
(In reply to comment #3)
> (In reply to comment #2)
> 
> LGTM; feel free to commit

Done.