Fix setMaintainer (#14)
* Fix brackets of maintainer email The email address of the maintainer must use angle brackes as per https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Maintainer Also there should be a space between name and email. * Use variable interpolation for maintainer name Since you already use interpolation for maintainer email you can use it for name too. * Fix default value for maintainer The default value for the maintainer still had the square brackets. * Fix tests for StandardFile The tests still used square brackets.
This commit is contained in:
parent
eb7402f531
commit
c2fa2ffd7f
|
@ -44,7 +44,7 @@ class StandardFile
|
||||||
"Recommends" => false,
|
"Recommends" => false,
|
||||||
"Suggests" => false,
|
"Suggests" => false,
|
||||||
"Installed-Size" => 1024,
|
"Installed-Size" => 1024,
|
||||||
"Maintainer" => "name [email]",
|
"Maintainer" => "name <email>",
|
||||||
"Conflicts" => false,
|
"Conflicts" => false,
|
||||||
"Replaces" => false,
|
"Replaces" => false,
|
||||||
"Provides" => "your-company",
|
"Provides" => "your-company",
|
||||||
|
@ -109,7 +109,7 @@ class StandardFile
|
||||||
public function setMaintainer($maintainer, $email = false)
|
public function setMaintainer($maintainer, $email = false)
|
||||||
{
|
{
|
||||||
$email = ($email) ? $email : "---";
|
$email = ($email) ? $email : "---";
|
||||||
return $this->_setProperty("Maintainer", $maintainer . "[{$email}]");
|
return $this->_setProperty("Maintainer", "{$maintainer} <{$email}>");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setConflicts($conflicts)
|
public function setConflicts($conflicts)
|
||||||
|
|
|
@ -21,7 +21,7 @@ Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Essential: no
|
Essential: no
|
||||||
Installed-Size: 1024
|
Installed-Size: 1024
|
||||||
Maintainer: name [email]
|
Maintainer: name <email>
|
||||||
Provides: your-company
|
Provides: your-company
|
||||||
Description: Your description
|
Description: Your description
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ OEF;
|
||||||
$this->object["Architecture"] = "x86";
|
$this->object["Architecture"] = "x86";
|
||||||
$this->object["Essential"] = "yes";
|
$this->object["Essential"] = "yes";
|
||||||
$this->object["Installed-Size"] = "2048";
|
$this->object["Installed-Size"] = "2048";
|
||||||
$this->object["Maintainer"] = "Walter Dal Mut [walter.dalmut at gmail dot com]";
|
$this->object["Maintainer"] = "Walter Dal Mut <walter.dalmut at gmail dot com>";
|
||||||
$this->object["Provides"] = "Corley SRL";
|
$this->object["Provides"] = "Corley SRL";
|
||||||
$this->object["Description"] = "My Desc";
|
$this->object["Description"] = "My Desc";
|
||||||
$this->object["Depends"] = "php5-cli";
|
$this->object["Depends"] = "php5-cli";
|
||||||
|
@ -63,7 +63,7 @@ Essential: yes
|
||||||
Depends: php5-cli
|
Depends: php5-cli
|
||||||
Recommends: php5-curl
|
Recommends: php5-curl
|
||||||
Installed-Size: 2048
|
Installed-Size: 2048
|
||||||
Maintainer: Walter Dal Mut [walter.dalmut at gmail dot com]
|
Maintainer: Walter Dal Mut <walter.dalmut at gmail dot com>
|
||||||
Provides: Corley SRL
|
Provides: Corley SRL
|
||||||
Description: My Desc
|
Description: My Desc
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue